package com.mvvm.library.base;

import androidx.databinding.BindingAdapter;
import androidx.recyclerview.widget.RecyclerView;

import java.util.List;
/**
 * @创建时间：2023/2/27
 * @作者：小蔡
 * @功能介绍：
 */
public class BaseBindAdapter {

    /**
     * 设置列表界面
     *
     * @param view
     * @param list
     */
    @BindingAdapter("submitList")
    public static void submitList(RecyclerView view, List<?> list) {
        RecyclerView.Adapter adapter = view.getAdapter();
        if (adapter instanceof BaseAdapter) {
            ((BaseAdapter) adapter).submitList(list);
        }
    }



}
